<template>
  <div></div>
</template>
<script setup>
import { Leafer, Pen, Text } from 'leafer-ui';
import '@leafer-in/animate' // 导入动画插件 //
const leafer = new Leafer({
  view: window
})
const pen = new Pen()
pen.setStyle({
  fill: 'gray',
  windingRule: 'evenodd',
})
// pen.roundRect(0, 0, 100, 100, 30).arc(50, 50, 25)
pen.setStyle({
  x: 50, y: 50, fill: 'green'
})
pen.arc(0, 0, 20)
//  Text
const text = new Text({
  fill: '#32cd79',
  animation: {
    style: { text: 'Welcome to LeaferJS' },
    duration: 2,
  }
})


leafer.add(pen)
leafer.add(text)
</script>
